<!DOCTYPE html>
<html>
<head><meta name="generator" content="Hexo 3.8.0">
  <meta charset="utf-8">
  <title>SSH连接交换机慢 | JiaHan&#39;s Notes</title>
  <meta name="keywords" content>
  <meta name="description" content="SSH连接交换机慢 | JiaHan&#39;s Notes">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="description" content="名称xdotool  - 命令行X11自动化工具 描述xdotool允许您以编程方式（或手动）模拟键盘输入和鼠标活动，移动和调整窗口大小等。它使用X11的XTEST扩展和其他Xlib函数来完成此操作。">
<meta name="keywords" content="Linux,xdotool">
<meta property="og:type" content="article">
<meta property="og:title" content="Linux下按键精灵xdotool">
<meta property="og:url" content="https://jia_han.gitee.io/2019/03/21/xdotool/index.html">
<meta property="og:site_name" content="JiaHan&#39;s Notes">
<meta property="og:description" content="名称xdotool  - 命令行X11自动化工具 描述xdotool允许您以编程方式（或手动）模拟键盘输入和鼠标活动，移动和调整窗口大小等。它使用X11的XTEST扩展和其他Xlib函数来完成此操作。">
<meta property="og:locale" content="zh-Hans">
<meta property="og:updated_time" content="2019-11-12T02:21:04.809Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Linux下按键精灵xdotool">
<meta name="twitter:description" content="名称xdotool  - 命令行X11自动化工具 描述xdotool允许您以编程方式（或手动）模拟键盘输入和鼠标活动，移动和调整窗口大小等。它使用X11的XTEST扩展和其他Xlib函数来完成此操作。">


<link rel="icon" href="/img/avatar.png">

<link href="/css/style.css?v=1.0.1" rel="stylesheet">

<link href="/css/hl_theme/atom-light.css?v=1.0.1" rel="stylesheet">

<link href="//cdn.bootcss.com/animate.css/3.5.2/animate.min.css" rel="stylesheet">
<link href="//cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">

<script src="//cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script>
<script src="/js/jquery.autocomplete.min.js?v=1.0.1"></script>

<script src="//cdn.bootcss.com/highlight.js/9.12.0/highlight.min.js"></script>
<script>
    hljs.initHighlightingOnLoad();
</script>

<script src="//cdn.bootcss.com/nprogress/0.2.0/nprogress.min.js"></script>



<script src="//cdn.bootcss.com/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>

<script src="/js/iconfont.js?v=1.0.1"></script>

</head>
<div style="display: none">
  <input class="theme_disqus_on" value="false">
  <input class="theme_preload_comment" value="false">
  <input class="theme_blog_path" value>
</div>

<body>
<aside class="nav">
    <div class="nav-left">
        <a href="/" class="avatar_target">
    <img class="avatar" src="/img/avatar.png">
</a>
<div class="author">
    <span>Jia Han</span>
</div>

<div class="icon">
    
        
        <a title="github" href="https://github.com/jia_han" target="_blank">
            
                <svg class="iconfont-svg" aria-hidden="true">
                    <use xlink:href="#icon-github"/>
                </svg>
            
        </a>
        
    
        
    
        
    
        
    
        
    
        
        <a title="weibo" href="https://weibo.com/u/6200025046" target="_blank">
            
                <svg class="iconfont-svg" aria-hidden="true">
                    <use xlink:href="#icon-weibo"/>
                </svg>
            
        </a>
        
    
        
    
        
    
        
    
        
        <a title="oschina" href="https://my.oschina.net/u/3252136" target="_blank">
            
                <svg class="iconfont-svg" aria-hidden="true">
                    <use xlink:href="#icon-oschina"/>
                </svg>
            
        </a>
        
    
        
    
        
        <a title="email" href="mailto:jh_jiahan@163.com" target="_blank">
            
                <svg class="iconfont-svg" aria-hidden="true">
                    <use xlink:href="#icon-email"/>
                </svg>
            
        </a>
        
    
        
        <a title="qq" href="http://wpa.qq.com/msgrd?v=3&uin=2554151483&site=qq&menu=yes" target="_blank">
            
                <svg class="iconfont-svg" aria-hidden="true">
                    <use xlink:href="#icon-qq"/>
                </svg>
            
        </a>
        
    
        
        <a title="neteasemusic" href="https://music.163.com/" target="_blank">
            
                <svg class="iconfont-svg" aria-hidden="true">
                    <use xlink:href="#icon-neteasemusic"/>
                </svg>
            
        </a>
        
    
</div>




<ul>
    <li><div class="all active">全部文章<small>(3)</small></div></li>
    
        
            
            <li><div data-rel="开发"><i class="fold iconfont icon-right"></i>开发<small>(0)</small></div>
                
                    <ul class="sub hide">
                        
                        <li><div data-rel="测试"><i class="fold iconfont icon-right"></i>测试<small>(0)</small></div>
                            
                                <ul class="sub hide">
                                    
                                    <li><div data-rel="系统">系统<small>(0)</small></div>
                                    </li>
                                    
                                </ul>
                            
                        </li>
                            
                    </ul>
                
            </li>
            
        
    
        
            
        
    
        
            
        
    
        
            
            <li><div data-rel="系统">系统<small>(2)</small></div>
                
            </li>
            
        
    
        
            
            <li><div data-rel="Python">Python<small>(1)</small></div>
                
            </li>
            
        
    
</ul>
<div class="left-bottom">
    <div class="menus">
    
    
    
    
    </div>
    <div><a class="about  hasFriend  site_url" href="/about">关于</a><a style="width: 50%" class="friends">友链</a></div>
</div>
<input type="hidden" id="yelog_site_posts_number" value="3">

<div style="display: none">
    <span id="busuanzi_value_site_uv"></span>
    <span id="busuanzi_value_site_pv"></span>
</div>

    </div>
    <div class="nav-right">
        <div class="friends-area">
    <div class="friends-title">
        友情链接
        <i class="back-title-list"></i>
    </div>
    <div class="friends-content">
        <ul>
            
            <li><a target="_blank" href="http://yelog.org/">叶落阁</a></li>
            
        </ul>
    </div>
</div>
        <div class="title-list">
    <form onkeydown="if(event.keyCode==13){return false;}">
        <input class="search" type="text" placeholder="Search..." autocomplete="off" id="local-search-input">
        <i class="cross"></i>
        <span>
            <label for="tagswitch">Tags:</label>
            <input id="tagswitch" type="checkbox" style="display: none">
            <i id="tagsWitchIcon"></i>
        </span>
    </form>
    <div class="tags-list">
    
    <li class="article-tag-list-item">
        <a href="javascript:" class="color1">Linux</a>
    </li>
    
    <li class="article-tag-list-item">
        <a href="javascript:" class="color3">xdotool</a>
    </li>
    
    <div class="clearfix"></div>
</div>

    
    <nav id="title-list-nav">
        
        <a class="Python " href="/jia_han/2019/03/21/tkinter/" data-tag data-author>
            <span class="post-title" title="tkinter简单实用">tkinter简单实用</span>
            <span class="post-date" title="2019-03-21 16:57:46">2019/03/21</span>
        </a>
        
        <a class="系统 " href="/jia_han/2019/03/21/ssh/" data-tag data-author>
            <span class="post-title" title="SSH连接交换机慢">SSH连接交换机慢</span>
            <span class="post-date" title="2019-03-21 16:57:46">2019/03/21</span>
        </a>
        
        <a class="系统 " href="/jia_han/2019/03/21/xdotool/" data-tag="Linux,xdotool" data-author>
            <span class="post-title" title="Linux下按键精灵xdotool">Linux下按键精灵xdotool</span>
            <span class="post-date" title="2019-03-21 16:57:46">2019/03/21</span>
        </a>
        
    </nav>
</div>
    </div>
    <div class="hide-list">
        <div class="semicircle">
            <div class="brackets first"><</div>
            <div class="brackets">&gt;</div>
        </div>
    </div>
</aside>
<div class="post">
    <div class="pjax">
        <article id="post-ssh" class="article article-type-post" itemscope itemprop="blogPost">
    
        <h1 class="article-title">SSH连接交换机慢</h1>
    
    <div class="article-meta">
        
        
        
        <span class="book">
            
                <a href="javascript:" data-rel="系统">系统</a>
            
        </span>
        
        
    </div>
    <div class="article-meta">
        
        创建时间:<time class="date" title="更新时间: 2019-11-12 10:18:13">2019-03-21 16:57</time>
        
    </div>
    <div class="article-meta">
        
        
        <span id="busuanzi_container_page_pv">
            阅读:<span id="busuanzi_value_page_pv">
                <span class="count-comment">
                    <span class="spinner">
                      <div class="cube1"></div>
                      <div class="cube2"></div>
                    </span>
                </span>
            </span>
        </span>
        
        
    </div>
    
    <div class="toc-ref">
    
        <ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#问题：通过debian7系统ssh方式登录huaweis5700交-换机，在密码认证前会停顿10几秒"><span class="toc-text">问题：通过debian7系统ssh方式登录huaweis5700交 换机，在密码认证前会停顿10几秒</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#解决方案："><span class="toc-text">解决方案：</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#ssh-debug日志"><span class="toc-text">ssh debug日志</span></a></li></ol></li></ol>
    
<style>
    .left-col .switch-btn,
    .left-col .switch-area {
        display: none;
    }
    .toc-level-3 i,
    .toc-level-3 ol {
        display: none !important;
    }
</style>
</div>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h1 id="问题：通过debian7系统ssh方式登录huaweis5700交-换机，在密码认证前会停顿10几秒"><a href="#问题：通过debian7系统ssh方式登录huaweis5700交-换机，在密码认证前会停顿10几秒" class="headerlink" title="问题：通过debian7系统ssh方式登录huaweis5700交 换机，在密码认证前会停顿10几秒"></a>问题：通过debian7系统ssh方式登录huaweis5700交 换机，在密码认证前会停顿10几秒</h1><h2 id="解决方案："><a href="#解决方案：" class="headerlink" title="解决方案："></a>解决方案：</h2><p>通过ssh debug日志分析出： </p>
<ol>
<li>连接卡在密钥和算法协商阶段10几秒。  </li>
<li>服务端支持密钥为：ecdsa­sha2­nistp521,ssh­dss,ssh­rsa。</li>
<li>服务端支持算法为：diffie­hellman­group­exchange­sha1,diffie­hellman­group14sha1。  </li>
<li>客户端和服务端协商算法为：diffie­hellman­group­exchange­sha1 </li>
<li>客户端和服务端协商密钥为：ecdsa­sha2­nistp521</li>
</ol>
<p>服务端支持的两种算法安全级别是由高到低的顺序，算法安全级别越高，需要计算的时间越 长，而不同的设备形态处理能力不同，性能稍弱的设备计算时间就稍长。<br>所以，客户端更改算法diffie­hellman­group14­sha1去连接服务端<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ssh ‐o KexAlgorithms=diffie‐hellman‐group14‐sha1 199.1.1.77</span><br></pre></td></tr></table></figure></p>
<p>如果将主机密钥更改为rsa,连接将会更快，但是安全性就会降低<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ssh ‐o KexAlgorithms=diffie‐hellman‐group14‐sha1 ‐o  HostKeyAlgorithms=ssh‐rsa  199.1.1.77</span><br></pre></td></tr></table></figure></p>
<p>最终如何修改，取决于服务端的设备性能和安全性</p>
<h2 id="ssh-debug日志"><a href="#ssh-debug日志" class="headerlink" title="ssh debug日志"></a>ssh debug日志</h2><p>SSH建立连接的过程主要分为5个阶段：</p>
<ol>
<li>SSH协议版本协商阶段。SSH目前包括SSH1和SSH2两个大版本。 </li>
<li>密钥和算法协商阶段，SSH支持多种加密算法，双方根据自己和对端支持的算法进 行协商，最终决定要使用的算法。 </li>
<li>认证阶段，服务器对客户端进行身份验证。</li>
<li>会话请求阶段，完成认证后，客户端会向服务器端发送会话请求。 </li>
<li>交互会话阶段，会话请求通过后，服务器端和客户端进行信息的交互</li>
</ol>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">#SSH协议版本协商阶段。SSH目前包括SSH1和SSH2两个大版本。</span></span><br><span class="line">OpenSSH_7.7p1, OpenSSL 1.0.1e 11 Feb 2013</span><br><span class="line">debug1: Reading configuration data /etc/ssh/ssh_config</span><br><span class="line">debug1: /etc/ssh/ssh_config line 19: Applying options <span class="keyword">for</span> *</span><br><span class="line">/etc/ssh/ssh_config line 52: Unsupported option <span class="string">"gssapiauthentication"</span></span><br><span class="line">/etc/ssh/ssh_config line 53: Unsupported option <span class="string">"gssapidelegatecredentials"</span></span><br><span class="line">debug2: resolve_canonicalize: hostname 199.1.1.77 is address</span><br><span class="line">debug2: ssh_connect_direct: needpriv 0</span><br><span class="line">debug1: Connecting to 199.1.1.77 [199.1.1.77] port 22.</span><br><span class="line">debug1: Connection established.</span><br><span class="line">debug1: permanently_set_uid: 0/0</span><br><span class="line">debug1: key_load_public: No such file or directory</span><br><span class="line">debug1: identity file /root/.ssh/id_rsa <span class="built_in">type</span> -1</span><br><span class="line">debug1: key_load_public: No such file or directory</span><br><span class="line">debug1: identity file /root/.ssh/id_rsa-cert <span class="built_in">type</span> -1</span><br><span class="line">debug1: key_load_public: No such file or directory</span><br><span class="line">debug1: identity file /root/.ssh/id_dsa <span class="built_in">type</span> -1</span><br><span class="line">debug1: key_load_public: No such file or directory</span><br><span class="line">debug1: identity file /root/.ssh/id_dsa-cert <span class="built_in">type</span> -1</span><br><span class="line">debug1: key_load_public: No such file or directory</span><br><span class="line">debug1: identity file /root/.ssh/id_ecdsa <span class="built_in">type</span> -1</span><br><span class="line">debug1: key_load_public: No such file or directory</span><br><span class="line">debug1: identity file /root/.ssh/id_ecdsa-cert <span class="built_in">type</span> -1</span><br><span class="line">debug1: key_load_public: No such file or directory</span><br><span class="line">debug1: identity file /root/.ssh/id_ed25519 <span class="built_in">type</span> -1</span><br><span class="line">debug1: key_load_public: No such file or directory</span><br><span class="line">debug1: identity file /root/.ssh/id_ed25519-cert <span class="built_in">type</span> -1</span><br><span class="line">debug1: key_load_public: No such file or directory</span><br><span class="line">debug1: identity file /root/.ssh/id_xmss <span class="built_in">type</span> -1</span><br><span class="line">debug1: key_load_public: No such file or directory</span><br><span class="line">debug1: identity file /root/.ssh/id_xmss-cert <span class="built_in">type</span> -1</span><br><span class="line">debug1: Local version string SSH-2.0-OpenSSH_7.7</span><br><span class="line">debug1: Remote protocol version 2.0, remote software version -</span><br><span class="line">debug1: no match: -</span><br><span class="line"><span class="comment">#密钥和算法协商阶段，SSH支持多种加密算法，双方根据自己和对端支持的算法进行协商，最终决定要使用的算法。</span></span><br><span class="line">debug2: fd 3 setting O_NONBLOCK</span><br><span class="line">debug1: Authenticating to 199.1.1.77:22 as <span class="string">'zhaolei'</span></span><br><span class="line">debug3: hostkeys_foreach: reading file <span class="string">"/root/.ssh/known_hosts"</span></span><br><span class="line">debug3: record_hostkey: found key <span class="built_in">type</span> ECDSA <span class="keyword">in</span> file /root/.ssh/known_hosts:1</span><br><span class="line">debug3: load_hostkeys: loaded 1 keys from 199.1.1.77</span><br><span class="line">debug3: order_hostkeyalgs: prefer hostkeyalgs: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521</span><br><span class="line">debug3: send packet: <span class="built_in">type</span> 20</span><br><span class="line">debug1: SSH2_MSG_KEXINIT sent</span><br><span class="line">debug3: receive packet: <span class="built_in">type</span> 20</span><br><span class="line">debug1: SSH2_MSG_KEXINIT received</span><br><span class="line">debug2: <span class="built_in">local</span> client KEXINIT proposal</span><br><span class="line">88：debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,ext-info-c</span><br><span class="line">debug2: host key algorithms: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa</span><br><span class="line">debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com</span><br><span class="line">debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com</span><br><span class="line">debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1</span><br><span class="line">debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1</span><br><span class="line">debug2: compression ctos: none,zlib@openssh.com,zlib</span><br><span class="line">debug2: compression stoc: none,zlib@openssh.com,zlib</span><br><span class="line">debug2: languages ctos: </span><br><span class="line">debug2: languages stoc: </span><br><span class="line">debug2: first_kex_follows 0 </span><br><span class="line">debug2: reserved 0 </span><br><span class="line">100：debug2: peer server KEXINIT proposal:debug2: KEX algorithms: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1</span><br><span class="line">debug2: host key algorithms: ecdsa-sha2-nistp521,ssh-dss,ssh-rsa</span><br><span class="line">debug2: ciphers ctos: aes256-ctr,aes128-ctr,aes256-cbc,aes128-cbc,3des-cbc</span><br><span class="line">debug2: ciphers stoc: aes256-ctr,aes128-ctr,aes256-cbc,aes128-cbc,3des-cbc</span><br><span class="line">debug2: MACs ctos: hmac-sha2-256,hmac-sha2-256-96,hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96</span><br><span class="line">debug2: MACs stoc: hmac-sha2-256,hmac-sha2-256-96,hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96</span><br><span class="line">debug2: compression ctos: none,zlib</span><br><span class="line">debug2: compression stoc: none,zlib</span><br><span class="line">debug2: languages ctos: </span><br><span class="line">debug2: languages stoc: </span><br><span class="line">debug2: first_kex_follows 0 </span><br><span class="line">debug2: reserved 0 </span><br><span class="line">debug1: kex: algorithm: diffie-hellman-group-exchange-sha1</span><br><span class="line">debug1: kex: host key algorithm: ecdsa-sha2-nistp521</span><br><span class="line">debug1: kex: server-&gt;client cipher: aes128-ctr MAC: hmac-sha2-256 compression: none</span><br><span class="line">debug1: kex: client-&gt;server cipher: aes128-ctr MAC: hmac-sha2-256 compression: none</span><br><span class="line">debug3: send packet: <span class="built_in">type</span> 34</span><br><span class="line">debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(2048&lt;8192&lt;8192) sent</span><br><span class="line">debug3: receive packet: <span class="built_in">type</span> 31</span><br><span class="line">debug1: got SSH2_MSG_KEX_DH_GEX_GROUP</span><br><span class="line">debug2: bits <span class="built_in">set</span>: 2079/4096</span><br><span class="line">debug3: send packet: <span class="built_in">type</span> 32</span><br><span class="line">debug1: SSH2_MSG_KEX_DH_GEX_INIT sent</span><br><span class="line">debug3: receive packet: <span class="built_in">type</span> 33</span><br><span class="line"><span class="comment">#在此停留10几秒</span></span><br><span class="line">debug1: got SSH2_MSG_KEX_DH_GEX_REPLY</span><br><span class="line">debug1: Server host key: ecdsa-sha2-nistp521 SHA256:IhwUigGl8F9tPkfE8p7WwaUFoLVOF/mnQsfrF0tpj9g</span><br><span class="line">debug3: hostkeys_foreach: reading file <span class="string">"/root/.ssh/known_hosts"</span></span><br><span class="line">debug3: record_hostkey: found key <span class="built_in">type</span> ECDSA <span class="keyword">in</span> file /root/.ssh/known_hosts:1</span><br><span class="line">debug3: load_hostkeys: loaded 1 keys from 199.1.1.77</span><br><span class="line">debug1: Host <span class="string">'199.1.1.77'</span> is known and matches the ECDSA host key.</span><br><span class="line">debug1: Found key <span class="keyword">in</span> /root/.ssh/known_hosts:1</span><br><span class="line">debug2: bits <span class="built_in">set</span>: 2022/4096</span><br><span class="line">debug3: send packet: <span class="built_in">type</span> 21</span><br><span class="line">debug2: set_newkeys: mode 1</span><br><span class="line">debug1: rekey after 4294967296 blocks</span><br><span class="line">debug1: SSH2_MSG_NEWKEYS sent</span><br><span class="line">debug1: expecting SSH2_MSG_NEWKEYS</span><br><span class="line">debug3: receive packet: <span class="built_in">type</span> 21</span><br><span class="line">debug1: SSH2_MSG_NEWKEYS received</span><br><span class="line">debug2: set_newkeys: mode 0</span><br><span class="line">debug1: rekey after 4294967296 blocks</span><br><span class="line">debug2: key: /root/.ssh/id_rsa ((nil))</span><br><span class="line">debug2: key: /root/.ssh/id_dsa ((nil))</span><br><span class="line">debug2: key: /root/.ssh/id_ecdsa ((nil))</span><br><span class="line">debug2: key: /root/.ssh/id_ed25519 ((nil))</span><br><span class="line">debug2: key: /root/.ssh/id_xmss ((nil))</span><br><span class="line">debug3: send packet: <span class="built_in">type</span> 5</span><br><span class="line">debug3: receive packet: <span class="built_in">type</span> 6</span><br><span class="line">debug2: service_accept: ssh-userauth</span><br><span class="line">debug1: SSH2_MSG_SERVICE_ACCEPT received</span><br><span class="line">debug3: send packet: <span class="built_in">type</span> 50</span><br><span class="line">debug3: receive packet: <span class="built_in">type</span> 51</span><br><span class="line"><span class="comment">#认证阶段，服务器对客户端进行身份验证</span></span><br><span class="line">debug1: Authentications that can <span class="built_in">continue</span>: publickey,keyboard-interactive,password</span><br><span class="line">debug3: start over, passed a different list publickey,keyboard-interactive,password</span><br><span class="line">debug3: preferred publickey,keyboard-interactive,password</span><br><span class="line">debug3: authmethod_lookup publickey</span><br><span class="line">debug3: remaining preferred: keyboard-interactive,password</span><br><span class="line">debug3: authmethod_is_enabled publickey</span><br><span class="line">debug1: Next authentication method: publickey</span><br><span class="line">debug1: Trying private key: /root/.ssh/id_rsa</span><br><span class="line">debug3: no such identity: /root/.ssh/id_rsa: No such file or directory</span><br><span class="line">debug1: Trying private key: /root/.ssh/id_dsa</span><br><span class="line">debug3: no such identity: /root/.ssh/id_dsa: No such file or directory</span><br><span class="line">debug1: Trying private key: /root/.ssh/id_ecdsa</span><br><span class="line">debug3: no such identity: /root/.ssh/id_ecdsa: No such file or directory</span><br><span class="line">debug1: Trying private key: /root/.ssh/id_ed25519</span><br><span class="line">debug3: no such identity: /root/.ssh/id_ed25519: No such file or directory</span><br><span class="line">debug1: Trying private key: /root/.ssh/id_xmss</span><br><span class="line">debug3: no such identity: /root/.ssh/id_xmss: No such file or directory</span><br><span class="line">debug2: we did not send a packet, <span class="built_in">disable</span> method</span><br><span class="line">debug3: authmethod_lookup keyboard-interactive</span><br><span class="line">debug3: remaining preferred: password</span><br><span class="line">debug3: authmethod_is_enabled keyboard-interactive</span><br><span class="line">debug1: Next authentication method: keyboard-interactive</span><br><span class="line">debug2: userauth_kbdint</span><br><span class="line">debug3: send packet: <span class="built_in">type</span> 50</span><br><span class="line">debug2: we sent a keyboard-interactive packet, <span class="built_in">wait</span> <span class="keyword">for</span> reply</span><br><span class="line">debug3: receive packet: <span class="built_in">type</span> 60</span><br><span class="line">debug2: input_userauth_info_req</span><br><span class="line">User Authentication</span><br><span class="line">debug2: input_userauth_info_req: num_prompts 1</span><br></pre></td></tr></table></figure>
      
       <hr><span style="font-style: italic;color: gray;"> 转载请注明来源，欢迎对文章中的引用来源进行考证，欢迎指出任何有错误或不够清晰的表达。可以在下面评论区评论，也可以邮件至 jh_jiahan@163.com </span>
    </div>
</article>


<p>
    <a href="javascript:void(0)" class="dashang" onclick="dashangToggle()">赏</a>
</p>


<div class="article_copyright">
    <p><span class="copy-title">文章标题:</span>SSH连接交换机慢</p>
    
    <p><span class="copy-title">本文作者:</span><a href="javascript:void(0)" title="Jia Han">Jia Han</a></p>
    <p><span class="copy-title">发布时间:</span>2019-03-21, 16:57:46</p>
    <p><span class="copy-title">最后更新:</span>2019-11-12, 10:18:13</p>
    <span class="copy-title">原始链接:</span><a class="post-url" href="/jia_han/2019/03/21/ssh/" title="SSH连接交换机慢">https://jia_han.gitee.io/2019/03/21/ssh/</a>
    <p>
        <span class="copy-title">版权声明:</span><i class="fa fa-creative-commons"></i> <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/" title="CC BY-NC-SA 4.0 International" target="_blank">"署名-非商用-相同方式共享 4.0"</a> 转载请保留原文链接及作者。
    </p>
</div>





    




    </div>
    <div class="copyright">
        <p class="footer-entry">©2019-2021 JH</p>
<p class="footer-entry">Built with <a href="https://hexo.io/" target="_blank">Hexo</a> and <a href="https://github.com/yelog/hexo-theme-3-hexo" target="_blank">3-hexo</a> theme</p>

    </div>
    <div class="full-toc">
        <button class="full"><span class="min "></span></button>
<button class="post-toc-menu"><span class="post-toc-menu-icons"></span></button>
<div class="post-toc"><span class="post-toc-title">目录</span>
    <div class="post-toc-content">

    </div>
</div>
<a class id="rocket" href="javascript:void(0)"></a>
    </div>
</div>
<div class="acParent"></div>

<div class="hide_box" onclick="dashangToggle()"></div>
<div class="shang_box">
    <a class="shang_close" href="javascript:void(0)" onclick="dashangToggle()">×</a>
    <div class="shang_tit">
        <p>喜欢就点赞,疼爱就打赏</p>
    </div>
    <div class="shang_payimg">
        <div class="pay_img">
            <img src="/img/alipay.jpg" class="alipay" title="扫码支持">
            <img src="/img/weixin.jpg" class="weixin" title="扫码支持">
        </div>
    </div>
    <div class="shang_payselect">
        <span><label><input type="radio" name="pay" checked value="alipay">支付宝</label></span><span><label><input type="radio" name="pay" value="weixin">微信</label></span>
    </div>
</div>


</body>
<script src="/js/jquery.pjax.js?v=1.0.1"></script>

<script src="/js/script.js?v=1.0.1"></script>
<script>
    var img_resize = 'default';
    /*作者、标签的自动补全*/
    $(function () {
        $('.search').AutoComplete({
            'data': ['#Linux','#xdotool',],
            'itemHeight': 20,
            'width': 418
        }).AutoComplete('show');
    })
    function initArticle() {
        /*渲染对应的表格样式*/
        
            $(".post .pjax table").addClass("green_title");
        

        /*渲染打赏样式*/
        
        $("input[name=pay]").on("click", function () {
            if($("input[name=pay]:checked").val()=="weixin"){
                $(".shang_box .shang_payimg .pay_img").addClass("weixin_img");
            } else {
                $(".shang_box .shang_payimg .pay_img").removeClass("weixin_img");
            }
        })
        

        /*高亮代码块行号*/
        
        $('pre code').each(function(){
            var lines = $(this).text().split('\n').length - 1, widther='';
            if (lines>99) {
                widther = 'widther'
            }
            var $numbering = $('<ul/>').addClass('pre-numbering ' + widther).attr("unselectable","on");
            $(this).addClass('has-numbering ' + widther)
                    .parent()
                    .append($numbering);
            for(var i=1;i<=lines;i++){
                $numbering.append($('<li/>').text(i));
            }
        });
        

        /*访问数量*/
        
        $.getScript("//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js");
        

        /*代码高亮，行号对齐*/
        $('.pre-numbering').css('line-height',$('.has-numbering').css('line-height'));

        
    }

    /*打赏页面隐藏与展示*/
    
    function dashangToggle() {
        $(".shang_box").fadeToggle();
        $(".hide_box").fadeToggle();
    }
    

</script>

<!--加入行号的高亮代码块样式-->

<style>
    pre{
        position: relative;
        margin-bottom: 24px;
        border-radius: 10px;
        border: 1px solid #e2dede;
        background: #FFF;
        overflow: hidden;
    }
    code.has-numbering{
        margin-left: 30px;
    }
    code.has-numbering.widther{
        margin-left: 35px;
    }
    .pre-numbering{
        margin: 0px;
        position: absolute;
        top: 0;
        left: 0;
        width: 20px;
        padding: 0.5em 3px 0.7em 5px;
        border-right: 1px solid #C3CCD0;
        text-align: right;
        color: #AAA;
        background-color: #fafafa;
    }
    .pre-numbering.widther {
        width: 35px;
    }
</style>

<!--自定义样式设置-->
<style>
    
    
    .nav {
        width: 542px;
    }
    .nav.fullscreen {
        margin-left: -542px;
    }
    .nav-left {
        width: 120px;
    }
    
    
    @media screen and (max-width: 1468px) {
        .nav {
            width: 492px;
        }
        .nav.fullscreen {
            margin-left: -492px;
        }
        .nav-left {
            width: 100px;
        }
    }
    
    
    @media screen and (max-width: 1024px) {
        .nav {
            width: 492px;
            margin-left: -492px
        }
        .nav.fullscreen {
            margin-left: 0;
        }
        .nav .hide-list.fullscreen {
            left: 492px
        }
    }
    
    @media screen and (max-width: 426px) {
        .nav {
            width: 100%;
        }
        .nav-left {
            width: 100%;
        }
    }
    
    
    .nav-right .title-list nav a .post-title, .nav-right .title-list #local-search-result a .post-title {
        color: #383636;
    }
    
    
    .nav-right .title-list nav a .post-date, .nav-right .title-list #local-search-result a .post-date {
        color: #5e5e5f;
    }
    
    
    .nav-right nav a.hover, #local-search-result a.hover{
        background-color: #e2e0e0;
    }
    
    

    /*列表样式*/
    
    .post .pjax article .article-entry>ol, .post .pjax article .article-entry>ul, .post .pjax article>ol, .post .pjax article>ul{
        border: #e2dede solid 1px;
        border-radius: 10px;
        padding: 10px 32px 10px 56px;
    }
    .post .pjax article .article-entry li>ol, .post .pjax article .article-entry li>ul,.post .pjax article li>ol, .post .pjax article li>ul{
        padding-top: 5px;
        padding-bottom: 5px;
    }
    .post .pjax article .article-entry>ol>li, .post .pjax article .article-entry>ul>li,.post .pjax article>ol>li, .post .pjax article>ul>li{
        margin-bottom: auto;
        margin-left: auto;
    }
    .post .pjax article .article-entry li>ol>li, .post .pjax article .article-entry li>ul>li,.post .pjax article li>ol>li, .post .pjax article li>ul>li{
        margin-bottom: auto;
        margin-left: auto;
    }
    

    /* 背景图样式 */
    
    


    /*引用块样式*/
    

    /*文章列表背景图*/
    
    .nav-right:before {
        content: ' ';
        display: block;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        opacity: 0.3;
        background: url("https://i.loli.net/2019/07/22/5d3521411f3f169375.png");
        background-repeat: no-repeat;
        background-position: 50% 0;
        -ms-background-size: cover;
        -o-background-size: cover;
        -moz-background-size: cover;
        -webkit-background-size: cover;
        background-size: cover;
    }
    

    
</style>







</html>
